This invention relates to a sector relocation system in a magnetic disc apparatus, and more particularly to relocation of sectors when one or more than one sector in a track of a magnetic disk apparatus is(are) found defective.
Usually, a spare sector for relocation is provided for each track, and relocation tracks comprising spare sectors for relocation are provided in a magnetic disc apparatus. And usually a magnetic disc apparatus has a micro-processor with RAM(random access memory), and the relocation of sectors is program-controlled by the micro-processor.
FIG. 8 shows an example of relocation of sectors in a prior art. A data track 81(a data track which is an object of relocation is called an object track, and an object track before relocation is called an original track) has seven sectors denoted by P0.about.P6. Here P means sector number in a physical address(called P-number), where the physical address is determined by physical position of the sector, and since P-number is not changed by relocation, P-numbers are omitted in other drawings.
Sectors of current use have sector numbers in a logical address(called L-number), where the logical address is the position of a sector in a whole virtual storage of the system. A logical address given by a program is converted to a corresponding physical address through a conversion table, and the converted physical address determines the sector to be accessed.
Thus, in the original track 81, L-numbers L0.about.L5 are assigned to sectors P0.about.P5 respectively, and a sector designated by P6 is a spare sector for relocation and is denoted by SP. C0.about.C5 are contents of sectors L0.about.L5 respectively.
Suppose a sector(P3) in the track 81 is found defective. A first step is to store all contents C0.about.C5 to a data-saving track(not shown in FIG. 8)temporarily. During whole process of relocation, C0.about.C5 might be damaged by a process or by an accident. Data stored in the data-saving track can restore damaged data. All contents are read out on a RAM from the original track 81, and then written on the data-saving track. Correspondence of track number and P-number between the original track and the data-saving track is memorized in a data-saving control table, and if L-numbers of the original track 81 are stored in sectors of the data-saving track, the L-numbers do not include track number information.
When contents C3 from the defective sector L3 are not reliable, the data at L3 are made blank.
When there is one spare sector for one defective sector in a track, the relocation is completed in the original sector. All data from the data-saving track are read out on the RAM, and the data on the RAM are written in the original track 81 in the order of the L-number in the original track 81 bypassing the defective sector P3.
The defective sector P3 is marked by DE(Defective Sector), and the use is prohibited. The result of relocation is shown by numeral 82.
When there are two defective sectors (for example, sectors P3 and P5) for one spare sector in an original track, a relocation track 84 is used. All data from the data-saving track are read out on the RAM, and the data on the RAM are written in the relocation track 84 in the order of the P-number in the original track 81. The results of relocation are shown by numeral 83 for the original track and by numeral 84 for the relocation track.
Correspondence of track number and P-number between the original track and the relocation track is memorized in a relocation control table.
In the prior system as described in connection with FIG. 8, all the sectors of the original track 81 is relocated to a relocation track as shown by numeral 84, and indefectible, or undefective sectors of the original track 81 are left unused as shown by numeral 83.
And, if a relocation track has one or more than one defective tracks and can not receive all the L-numbers of sectors in an original track, another relocation track having a sufficient number of indefectible sectors must be used.
This relocation of a prior art, which is made in a track unit, is a waste of sectors as shown by "not used" sectors in a track 83 of FIG. 8. Similar waste of sectors occurs when a relocation track has not a sufficient number of indefectible sectors for receiving all the L-numbers in an original track. And, in an apparatus where total number of sectors per track are different between tracks of different radius, tracks with largest number of sectors must be assigned as relocation tracks.
Further, address correspondence between original tracks and relocation tracks is stored only in the relocation control table, and if contents of the table is lost, it is very difficult to restore the contents.
Similar problems subsist in the data-saving tracks. When a data-saving track does not have a sufficient number of indefectible sectors for receiving all the L-numbers in an original track, no sector of the data-saving track can be used as a data-saving sector. And, in an apparatus where total number of sectors per track are different between tracks of different radius, tracks with largest number of sectors must be assigned as data-saving tracks.
And, also in a data-saving track, address correspondence between original tracks and data-saving tracks is stored only in the data-saving control table, and if contents of the table is lost, it is very difficult to restore the contents.